import request from "./http";

export const reqLogin = (data) => {
  return request({
    url: '/users/login',
    method: 'post',
    data
  })
};

export const reqUserList = (data) => {
  return request({
    url: '/users/list',
    method: 'get',
    params: data
  })
}

export const reqUserDetail = (id, data = {}) => {
  return request({
    url: '/users/user/' + id,
    method: 'post',
    data
  })
}

export const reqUpdateUser = (id, data={}) => {
  return request({
    url: '/users/user/' + id,
    method: 'put',
    data
  })
}
